import 'package:efood_multivendor/util/dimensions.dart';
import 'package:flutter/material.dart';

void showCustomModalBottomSheet(BuildContext context, Widget child) {
  showModalBottomSheet<dynamic>(
    isScrollControlled: true,
    shape: RoundedRectangleBorder(
      borderRadius: BorderRadius.circular(Dimensions.RADIUS_EXTRA_LARGE),
    ),
    context: context,
    builder: (BuildContext bc) {
      return LayoutBuilder(
        builder: (BuildContext context, BoxConstraints constraints) {
          return Padding(
            padding: EdgeInsets.only(
              bottom: MediaQuery.of(context).viewInsets.bottom,
            ),
            child: Wrap(
              children: <Widget>[
                child,
              ],
            ),
          );
        },
      );
    },
  );
}
